package com.ssii.www.myproject.shiro.factory;

import java.util.LinkedHashMap;
import java.util.Map;

public class FilterChainDefinitionMapFactory {
  /**
   * 自定义FilterChainDefinition 减少配置文件冗余
   * @return
   */
  public Map<String,String> getFilterChainDefinitionMapFactory(){
    //需要保证放入的顺序 所以要用LinkedHashMap
    Map<String,String> map = new LinkedHashMap<>();
    map.put("/login","anon");
    map.put("login.jsp","anon");
    //普通用户申请系统不需要被拦截
    //map.put("/autho/*","anon");
    map.put("/system/page","anon");
    map.put("/static/**","anon");
    map.put("/logout","logout");
    map.put("/**","authc");
    return map;
  }
}
